Termination w.r.t. Q of the following Term Rewriting System could be proven:

Q restricted rewrite system:
The TRS R consists of the following rules:

a__first(0, X) → nil
a__first(s(X), cons(Y, Z)) → cons(mark(Y), first(X, Z))
a__from(X) → cons(mark(X), from(s(X)))
mark(first(X1, X2)) → a__first(mark(X1), mark(X2))
mark(from(X)) → a__from(mark(X))
mark(0) → 0
mark(nil) → nil
mark(s(X)) → s(mark(X))
mark(cons(X1, X2)) → cons(mark(X1), X2)
a__first(X1, X2) → first(X1, X2)
a__from(X) → from(X)

Q is empty.


QTRS
  ↳ DependencyPairsProof

Q restricted rewrite system:
The TRS R consists of the following rules:

a__first(0, X) → nil
a__first(s(X), cons(Y, Z)) → cons(mark(Y), first(X, Z))
a__from(X) → cons(mark(X), from(s(X)))
mark(first(X1, X2)) → a__first(mark(X1), mark(X2))
mark(from(X)) → a__from(mark(X))
mark(0) → 0
mark(nil) → nil
mark(s(X)) → s(mark(X))
mark(cons(X1, X2)) → cons(mark(X1), X2)
a__first(X1, X2) → first(X1, X2)
a__from(X) → from(X)

Q is empty.

Using Dependency Pairs [1,13] we result in the following initial DP problem:
Q DP problem:
The TRS P consists of the following rules:

MARK(first(X1, X2)) → MARK(X1)
MARK(first(X1, X2)) → A__FIRST(mark(X1), mark(X2))
MARK(s(X)) → MARK(X)
MARK(first(X1, X2)) → MARK(X2)
MARK(from(X)) → MARK(X)
MARK(from(X)) → A__FROM(mark(X))
MARK(cons(X1, X2)) → MARK(X1)
A__FROM(X) → MARK(X)
A__FIRST(s(X), cons(Y, Z)) → MARK(Y)

The TRS R consists of the following rules:

a__first(0, X) → nil
a__first(s(X), cons(Y, Z)) → cons(mark(Y), first(X, Z))
a__from(X) → cons(mark(X), from(s(X)))
mark(first(X1, X2)) → a__first(mark(X1), mark(X2))
mark(from(X)) → a__from(mark(X))
mark(0) → 0
mark(nil) → nil
mark(s(X)) → s(mark(X))
mark(cons(X1, X2)) → cons(mark(X1), X2)
a__first(X1, X2) → first(X1, X2)
a__from(X) → from(X)

Q is empty.
We have to consider all minimal (P,Q,R)-chains.

↳ QTRS
  ↳ DependencyPairsProof
QDP
      ↳ EdgeDeletionProof

Q DP problem:
The TRS P consists of the following rules:

MARK(first(X1, X2)) → MARK(X1)
MARK(first(X1, X2)) → A__FIRST(mark(X1), mark(X2))
MARK(s(X)) → MARK(X)
MARK(first(X1, X2)) → MARK(X2)
MARK(from(X)) → MARK(X)
MARK(from(X)) → A__FROM(mark(X))
MARK(cons(X1, X2)) → MARK(X1)
A__FROM(X) → MARK(X)
A__FIRST(s(X), cons(Y, Z)) → MARK(Y)

The TRS R consists of the following rules:

a__first(0, X) → nil
a__first(s(X), cons(Y, Z)) → cons(mark(Y), first(X, Z))
a__from(X) → cons(mark(X), from(s(X)))
mark(first(X1, X2)) → a__first(mark(X1), mark(X2))
mark(from(X)) → a__from(mark(X))
mark(0) → 0
mark(nil) → nil
mark(s(X)) → s(mark(X))
mark(cons(X1, X2)) → cons(mark(X1), X2)
a__first(X1, X2) → first(X1, X2)
a__from(X) → from(X)

Q is empty.
We have to consider all minimal (P,Q,R)-chains.
We deleted some edges using various graph approximations

↳ QTRS
  ↳ DependencyPairsProof
    ↳ QDP
      ↳ EdgeDeletionProof
QDP
          ↳ QDPOrderProof

Q DP problem:
The TRS P consists of the following rules:

MARK(first(X1, X2)) → A__FIRST(mark(X1), mark(X2))
MARK(first(X1, X2)) → MARK(X1)
MARK(s(X)) → MARK(X)
MARK(first(X1, X2)) → MARK(X2)
MARK(from(X)) → MARK(X)
MARK(from(X)) → A__FROM(mark(X))
A__FIRST(s(X), cons(Y, Z)) → MARK(Y)
A__FROM(X) → MARK(X)
MARK(cons(X1, X2)) → MARK(X1)

The TRS R consists of the following rules:

a__first(0, X) → nil
a__first(s(X), cons(Y, Z)) → cons(mark(Y), first(X, Z))
a__from(X) → cons(mark(X), from(s(X)))
mark(first(X1, X2)) → a__first(mark(X1), mark(X2))
mark(from(X)) → a__from(mark(X))
mark(0) → 0
mark(nil) → nil
mark(s(X)) → s(mark(X))
mark(cons(X1, X2)) → cons(mark(X1), X2)
a__first(X1, X2) → first(X1, X2)
a__from(X) → from(X)

Q is empty.
We have to consider all minimal (P,Q,R)-chains.
We use the reduction pair processor [13].


The following pairs can be oriented strictly and are deleted.


MARK(first(X1, X2)) → A__FIRST(mark(X1), mark(X2))
MARK(first(X1, X2)) → MARK(X1)
MARK(first(X1, X2)) → MARK(X2)
A__FIRST(s(X), cons(Y, Z)) → MARK(Y)
The remaining pairs can at least be oriented weakly.

MARK(s(X)) → MARK(X)
MARK(from(X)) → MARK(X)
MARK(from(X)) → A__FROM(mark(X))
A__FROM(X) → MARK(X)
MARK(cons(X1, X2)) → MARK(X1)
Used ordering: Combined order from the following AFS and order.
MARK(x1)  =  MARK(x1)
first(x1, x2)  =  first(x1, x2)
A__FIRST(x1, x2)  =  A__FIRST(x1, x2)
mark(x1)  =  x1
s(x1)  =  x1
from(x1)  =  x1
A__FROM(x1)  =  A__FROM(x1)
cons(x1, x2)  =  x1
0  =  0
a__from(x1)  =  x1
nil  =  nil
a__first(x1, x2)  =  a__first(x1, x2)

Recursive Path Order [2].
Precedence:
[first2, AFIRST2, nil, afirst2] > [MARK1, AFROM1]


The following usable rules [14] were oriented:

mark(0) → 0
a__from(X) → cons(mark(X), from(s(X)))
mark(nil) → nil
mark(first(X1, X2)) → a__first(mark(X1), mark(X2))
a__from(X) → from(X)
mark(s(X)) → s(mark(X))
a__first(X1, X2) → first(X1, X2)
a__first(0, X) → nil
mark(from(X)) → a__from(mark(X))
mark(cons(X1, X2)) → cons(mark(X1), X2)
a__first(s(X), cons(Y, Z)) → cons(mark(Y), first(X, Z))



↳ QTRS
  ↳ DependencyPairsProof
    ↳ QDP
      ↳ EdgeDeletionProof
        ↳ QDP
          ↳ QDPOrderProof
QDP
              ↳ QDPOrderProof

Q DP problem:
The TRS P consists of the following rules:

MARK(s(X)) → MARK(X)
MARK(from(X)) → MARK(X)
MARK(from(X)) → A__FROM(mark(X))
MARK(cons(X1, X2)) → MARK(X1)
A__FROM(X) → MARK(X)

The TRS R consists of the following rules:

a__first(0, X) → nil
a__first(s(X), cons(Y, Z)) → cons(mark(Y), first(X, Z))
a__from(X) → cons(mark(X), from(s(X)))
mark(first(X1, X2)) → a__first(mark(X1), mark(X2))
mark(from(X)) → a__from(mark(X))
mark(0) → 0
mark(nil) → nil
mark(s(X)) → s(mark(X))
mark(cons(X1, X2)) → cons(mark(X1), X2)
a__first(X1, X2) → first(X1, X2)
a__from(X) → from(X)

Q is empty.
We have to consider all minimal (P,Q,R)-chains.
We use the reduction pair processor [13].


The following pairs can be oriented strictly and are deleted.


MARK(s(X)) → MARK(X)
MARK(from(X)) → MARK(X)
MARK(from(X)) → A__FROM(mark(X))
MARK(cons(X1, X2)) → MARK(X1)
A__FROM(X) → MARK(X)
The remaining pairs can at least be oriented weakly.
none
Used ordering: Combined order from the following AFS and order.
MARK(x1)  =  x1
s(x1)  =  s(x1)
from(x1)  =  from(x1)
A__FROM(x1)  =  A__FROM(x1)
mark(x1)  =  x1
cons(x1, x2)  =  cons(x1)
a__from(x1)  =  a__from(x1)
0  =  0
a__first(x1, x2)  =  a__first(x1, x2)
first(x1, x2)  =  first(x1, x2)
nil  =  nil

Recursive Path Order [2].
Precedence:
[from1, afrom1] > AFROM1 > s1
[from1, afrom1] > cons1 > s1
0 > nil > s1
[afirst2, first2] > cons1 > s1
[afirst2, first2] > nil > s1


The following usable rules [14] were oriented:

a__from(X) → from(X)
mark(0) → 0
a__from(X) → cons(mark(X), from(s(X)))
mark(s(X)) → s(mark(X))
a__first(X1, X2) → first(X1, X2)
a__first(0, X) → nil
mark(from(X)) → a__from(mark(X))
mark(nil) → nil
mark(cons(X1, X2)) → cons(mark(X1), X2)
mark(first(X1, X2)) → a__first(mark(X1), mark(X2))
a__first(s(X), cons(Y, Z)) → cons(mark(Y), first(X, Z))



↳ QTRS
  ↳ DependencyPairsProof
    ↳ QDP
      ↳ EdgeDeletionProof
        ↳ QDP
          ↳ QDPOrderProof
            ↳ QDP
              ↳ QDPOrderProof
QDP
                  ↳ PisEmptyProof

Q DP problem:
P is empty.
The TRS R consists of the following rules:

a__first(0, X) → nil
a__first(s(X), cons(Y, Z)) → cons(mark(Y), first(X, Z))
a__from(X) → cons(mark(X), from(s(X)))
mark(first(X1, X2)) → a__first(mark(X1), mark(X2))
mark(from(X)) → a__from(mark(X))
mark(0) → 0
mark(nil) → nil
mark(s(X)) → s(mark(X))
mark(cons(X1, X2)) → cons(mark(X1), X2)
a__first(X1, X2) → first(X1, X2)
a__from(X) → from(X)

Q is empty.
We have to consider all minimal (P,Q,R)-chains.
The TRS P is empty. Hence, there is no (P,Q,R) chain.